import com.acme.bankapp.domain.Bank;
import com.acme.bankapp.BankService;
import com.acme.bankapp.domain.Gender;

public class SystemTest {
	static Bank bank = new Bank();
	public static void main(String[] args) {
		BankService service = new BankService();
		String[] test = {"A","A1","male","10","0","B","B1","female","11","-70","C","C1","male","10","12","D","D1","male","10","0"};
		for (int i = 0; i < 4; i++) {
			if (test[i*5+2].toUpperCase().charAt(0) == 'M') {
				service.addClient(bank,test[i*5],test[i*5+1],Double.parseDouble(test[i*5+3]),Double.parseDouble(test[i*5+4]),Gender.MALE);
			}
			else 
				if (test[i*5+2].toUpperCase().charAt(0) == 'F') {
					service.addClient(bank,test[i*5],test[i*5+1],Double.parseDouble(test[i*5+3]),Double.parseDouble(test[i*5+4]),Gender.FEMALE);
			}
		}
		service.printAllClients(bank);
		service.printClient(bank,"A", "A1", Gender.MALE);
		service.printClient(bank,"A", "A1", Gender.FEMALE);
		service.printBalance(bank);
		service.printClient(bank,"A", "A1", Gender.MALE);
		service.withdrawClient(bank,"A","A1", Gender.MALE, 9);
		service.printClient(bank,"A", "A1", Gender.MALE);
		service.printClient(bank, "B", "B1", Gender.FEMALE);
		service.withdrawClient(bank,"C", "C1", Gender.MALE, 12);
		service.printClient(bank,"C", "C1", Gender.MALE);
		service.withdrawClient(bank,"C", "C1", Gender.MALE, 110);
		service.printClient(bank,"C", "C1", Gender.MALE);
		service.depositeClient(bank,"C", "C1", Gender.MALE, 200);
		service.printClient(bank,"C", "C1", Gender.MALE);
		service.withdrawClient(bank, "C", "C1", Gender.MALE, 500);
		service.printClient(bank, "C", "C1", Gender.MALE);
		service.withdrawClient(bank, "B", "B1", Gender.MALE, 500);
	}
}
